//
//  JGCityCodeHelper.m
//  JGRider
//
//  Created by 单启志 on 2018/3/9.
//  Copyright © 2018年 ffq. All rights reserved.
//

#import "JGCityCodeHelper.h"
#import "JGCityModel.h"
@implementation JGCityCodeHelper
+(NSString*)getCodeWithName:(NSString*)name{

  NSArray *arr=[JGCityModel mj_objectArrayWithFilename:@"cityCode.plist"];

    for (int i=0; i<arr.count; i++) {
        JGCityModel *model=(JGCityModel*)arr[i];
       //NSString *subModelName=[model.title substringToIndex:model.title.length-1];
        NSString *subName=[name substringToIndex:name.length-1];

        if ([model.title containsString:subName]) {
            return model.Id;
        }
    }


    return nil;
}
@end
